import request from '@/utils/request'

// 查询用户回答列表
export function listAnswers(query) {
  return request({
    url: '/surveys/answers/list',
    method: 'get',
    params: query
  })
}

// 查询用户回答详细
export function getAnswers(id) {
  return request({
    url: '/surveys/answers/get',
    method: 'post',
    data: id
  })
}

// 新增用户回答
export function addAnswers(data) {
  return request({
    url: '/surveys/answers',
    method: 'post',
    data: data
  })
}

// 修改用户回答
export function updateAnswers(data) {
  return request({
    url: '/surveys/answers',
    method: 'put',
    data: data
  })
}

// 删除用户回答
export function delAnswers(id) {
  return request({
    url: '/surveys/answers/delete',
    method: 'delete',
    data: id
  })
}